In general, there has been known an image reading device that reads a white reference plate to acquire white reference data, stores the acquired white reference data in a non-volatile memory, and performs shading compensation using the stored white reference data. In a contact image sensor provided with a rod lens array, so-called lens irregularity, in which the intensity of light condensed by photoelectric conversion elements is increased near the center of each single lens constituting the rod lens array and is reduced near the edge of each single lens, may occur. Further, in a contact image sensor, a light source, a rod lens array, a substrate on which photoelectric conversion elements are mounted, and the like are fixed to a housing in a predetermined positional relationship. Such arrangement may cause positional shifts between each of the photoelectric conversion elements and the rod lens array with an increase in temperature because they have different coefficients of thermal expansion and are fixed in different methods.
The image reading device described in Japanese Patent Publication No. 5,131,056 is provided with a reference plate, and reads an image of the reference plate to acquire reference plate data. The image reading device derives a ratio between the acquired reference plate data and white reference data stored in advance as a reference ratio of each pixel in one line worth. The image reading device regards a pixel whose reference ratio is out of a predetermined range as an affected pixel affected by a foreign matter such as paper dust, and corrects the reference plate data of the affected pixel to set new white reference data.